<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        .xiaomi {
            width: 512px;
            height: 400px;
            border: 1px solid #f00;
            margin: 100px auto;
            overflow: hidden;
            position: relative;
        }
        .xiaomi span {
            position: absolute;
            left: 0;
            width: 100%;
            height: 200px;
            cursor: pointer;
        }
        .up {
            top: 0;
        }
        .down {
            bottom: 0;
        }
    </style>
</head>
<body>
<div class="xiaomi">
    <img src="mi.png" alt=""/>
    <span class="up"></span>
    <span class="down"></span>
</div>
</body>
</html>